package plus.exp;

import plus.B;
import plus.run.Emit;
import plus.run.Label;
import plus.run.VM;

public class E_Not extends Exp {
	Exp e;
	int lineNr;
	public E_Not(Exp e, int lineNr) {
		this.e = e;
		this.lineNr = lineNr;
	}
	@Override
	public void threadScope() { e.threadScope(); e.unify_with(B._bool); type = B._bool; }
	@Override String impliedName() { return e.impliedName(); }
	@Override String aThis() { return "a logical negation"; }
	@Override
	public void compilePush() { e.compilePush(); Emit.asm(VM.NOT); }
	@Override
	public void compileJcc(Label where, boolean when) { e.compileJcc(where, !when); }
}
